#pragma once

class Hud : public Singleton<Hud>
{
	CFont m_text;
	std::wstring m_szCurText;
	ui32 m_textSet;
	ui32 m_duration;
	ui32 m_color;
public:
	Hud();
	void Draw();
	void SetText(std::string szText, ui32 duration, ui32 color = 0x00F5C200, i32 texEntry = -1)
	{
		m_textSet = GetTickCount();
		m_duration = duration;
		auto text = sLocale.GetLocale(texEntry, szText);
		std::vector<wchar_t> uni(text.length() + 1);
		MultiByteToWideChar(CP_UTF8, 0, text.c_str(), uni.size(), &uni[0], uni.size());
		m_szCurText = &uni[0];
		m_color = color;
	}
};

#define sHud (*Hud::GetInstance())